class Cat:
    __name ="amy"

    def say(name):
        print(name)

"""
Traceback (most recent call last):
    ...
    Cat.say(Cat.__name)
            ^^^^^^^^^^
AttributeError: type object 'Cat' has no attribute '__name'
"""
# 由于私有变量无法在外部直接访问，所以这种间接访问的方式失败
# Cat.say(Cat.__name)

"""
    所以我们只能用之前那种不推荐的方式访问类的私有变量
"""
Cat.say(Cat._Cat__name)#amy